package com.lxp.controller;

import com.lxp.service.EmailService;
import com.lxp.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/email")
public class EmailController {


    @Autowired
    private EmailService emailService;

    //发送邮件
    @GetMapping ("/sendEmail/{userEmail}")
    public R sendEmail(@PathVariable String userEmail) {

        emailService.sendEmail(userEmail);
        return R.ok();
    }
}
